import request from '../utils/request';


export async function findOne(body) {
  return request('/api/store/find', {
    method: 'POST',
    body,
  });
}
export async function findMany(body) {
  return request('/api/store/find/many', {
    method: 'POST',
    body,
  });
}


export async function desktop(body) {
  return request('/api/store/desktop', {
    method: 'POST',
    body,
  });
}
//入库
export async function createInboundLot(body) {
  return request('/api/inbound/lot/create', {
    method: 'POST',
    body,
  });
}
export async function findInboundLots(body) {
  return request('/api/inbound/lot/find/many', {
    method: 'POST',
    body,
  });
}
export async function deleteInboundLot(body) {
  return request('/api/inbound/lot/delete', {
    method: 'POST',
    body,
  });
}
export async function inboundFindOne(body) {
  return request('/api/inbound/find', {
    method: 'POST',
    body,
  });
}

// export async function inboundFindMany(body) {
//   return request('/api/inbound/find/many', {
//     method: 'POST',
//     body,
//   });
// }
// export async function inboundUpdateOne(body) {
//   return request('/api/inbound/update', {
//     method: 'POST',
//     body,
//   });
// }

export async function outbound(body) {
  return request('/api/store/outbound', {
    method: 'POST',
    body,
  });
}

export async function outboundFindMany(body) {
  return request('/api/outbound/find/many', {
    method: 'POST',
    body,
  });
}
export async function findOutboundOrder(body) {
  return request('/api/outbound/find', {
    method: 'POST',
    body,
  });
}
export async function exportExcel(body) {
  return request('/api/store/export', {
    method: 'POST',
    body,
  });
}
export async function createOutboundLot(body) {
  return request('/api/outbound/lot/create', {
    method: 'POST',
    body,
  });
}
export async function deleteOutboundLot(body) {
  return request('/api/outbound/lot/delete', {
    method: 'POST',
    body,
  });
}
export async function findOutboundLots(body) {
  return request('/api/outbound/lot/find/many', {
    method: 'POST',
    body,
  });
}


// export async function findShippingFeeMany(body) {
//   return request('/api/store/shippingFee/find/many', {
//     method: 'POST',
//     body,
//   });
// }
// export async function updateShippingFee(body) {
//   return request('/api/store/shippingFee/update', {
//     method: 'POST',
//     body,
//   });
// }
//
// export async function deleteShippingFee(body) {
//   return request('/api/store/shippingFee/delete', {
//     method: 'POST',
//     body,
//   });
// }
//
// export async function createShippingFee(body) {
//   return request('/api/store/shippingFee/create', {
//     method: 'POST',
//     body,
//   });
// }
export async function assess(body) {
  return request('/api/store/assess', {
    method: 'POST',
    body,
  });
}
export async function procureReturnOfGoodsOutbound(body) {
  return request('/api/store/procureReturnOfGoodsOutbound', {
    method: 'POST',
    body,
  });
}

/**
 *   router.post('/api/store/discard/find/many', controller.store.findDiscardRecordMany);
 *   router.post('/api/store/discard/update', controller.store.updateDiscardRecord);
 *   router.post('/api/store/discard/create', controller.store.createDiscardRecord);
 *   router.post('/api/store/discard/delete', controller.store.deleteDiscardRecord);
 */
export async function findDiscardRecord(body) {
  return request('/api/store/discard/find', {
    method: 'POST',
    body,
  });
}
export async function findDiscardRecordMany(body) {
  return request('/api/store/discard/find/many', {
    method: 'POST',
    body,
  });
}
export async function updateDiscardRecord(body) {
  return request('/api/store/discard/update', {
    method: 'POST',
    body,
  });
}
export async function createDiscardRecord(body) {
  return request('/api/store/discard/create', {
    method: 'POST',
    body,
  });
}
export async function deleteDiscardRecord(body) {
  return request('/api/store/discard/delete', {
    method: 'POST',
    body,
  });
}
export async function reviewDiscardRecord(body) {
  return request('/api/store/discard/review', {
    method: 'POST',
    body,
  });
}
